{% extends 'index.html' %}
{% load static %}
<!--首页内容部分-->
{% block article %}

    <div>
        <span style="text-align: center;">
        <h1>{{article.title}}</h1>
            </span>
          <div class="article-desc">
            <!--变量|safe 转成html内容-->
                {{article.content|safe}}

            <div class="article-border">
                <span>
                    <a href="">{{article.user.name}}</a>&nbsp;&nbsp;&nbsp;
                </span>
                <span>
                    {% if article.update_time == article.pub_time %}
                    发布于&nbsp;&nbsp;{{article.pub_time|date:"Y-m-d H:m:s"}}&nbsp;&nbsp;&nbsp;
                    {% else %}
                    更新于&nbsp;&nbsp;{{article.update_time|date:"Y-m-d H:m:s" }}&nbsp;&nbsp;&nbsp;
                    {% endif %}
                </span>
                <span>
                    <img class="article-border-img" src="{% static 'blog/img/pinglun.png' %}">
                    <a href="">评论({{article.comment_count}})</a>&nbsp;&nbsp;&nbsp;
                </span>
                <span>
                    <img class="article-border-img" src="{% static 'blog/img/dianzan.png' %}">
                    <a href="">点赞({{article.up_count}})</a>&nbsp;&nbsp;&nbsp;
                </span>
                <span>
                    <img class="article-border-img" src="{% static 'blog/img/shoucang.png' %}">
                    <a href="">收藏({{article.up_count}})</a>
                </span>

            </div>
        </div>
</div>
{% endblock article %}